package cn.yy.pojo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Bankacount entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bankacount", catalog = "phoneerp")
public class Bankacount implements java.io.Serializable {

	// Fields

	private Integer bankAcountId;
	private String bankName;
	private String bankAccount;
	private String accountOwner;
	private Integer accountContact;
	private Double originalAmount;
	private String type;
	private Double saveIn;
	private Double pay;
	private Double finalAmount;
	private Integer paymentId;
	private Set<Recipt> recipts = new HashSet<Recipt>(0);
	private Set<Paybill> paybills = new HashSet<Paybill>(0);

	// Constructors

	/** default constructor */
	public Bankacount() {
	}

	/** minimal constructor */
	public Bankacount(String bankName, String bankAccount, String accountOwner,
			Integer accountContact, Double originalAmount, String type,
			Double saveIn, Double pay, Double finalAmount, Integer paymentId) {
		this.bankName = bankName;
		this.bankAccount = bankAccount;
		this.accountOwner = accountOwner;
		this.accountContact = accountContact;
		this.originalAmount = originalAmount;
		this.type = type;
		this.saveIn = saveIn;
		this.pay = pay;
		this.finalAmount = finalAmount;
		this.paymentId = paymentId;
	}

	/** full constructor */
	public Bankacount(String bankName, String bankAccount, String accountOwner,
			Integer accountContact, Double originalAmount, String type,
			Double saveIn, Double pay, Double finalAmount, Integer paymentId,
			Set<Recipt> recipts, Set<Paybill> paybills) {
		this.bankName = bankName;
		this.bankAccount = bankAccount;
		this.accountOwner = accountOwner;
		this.accountContact = accountContact;
		this.originalAmount = originalAmount;
		this.type = type;
		this.saveIn = saveIn;
		this.pay = pay;
		this.finalAmount = finalAmount;
		this.paymentId = paymentId;
		this.recipts = recipts;
		this.paybills = paybills;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "bankAcountId", unique = true, nullable = false)
	public Integer getBankAcountId() {
		return this.bankAcountId;
	}

	public void setBankAcountId(Integer bankAcountId) {
		this.bankAcountId = bankAcountId;
	}

	@Column(name = "bankName", nullable = false, length = 20)
	public String getBankName() {
		return this.bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	@Column(name = "bankAccount", nullable = false, length = 20)
	public String getBankAccount() {
		return this.bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	@Column(name = "accountOwner", nullable = false, length = 20)
	public String getAccountOwner() {
		return this.accountOwner;
	}

	public void setAccountOwner(String accountOwner) {
		this.accountOwner = accountOwner;
	}

	@Column(name = "accountContact", nullable = false)
	public Integer getAccountContact() {
		return this.accountContact;
	}

	public void setAccountContact(Integer accountContact) {
		this.accountContact = accountContact;
	}

	@Column(name = "originalAmount", nullable = false, precision = 22, scale = 0)
	public Double getOriginalAmount() {
		return this.originalAmount;
	}

	public void setOriginalAmount(Double originalAmount) {
		this.originalAmount = originalAmount;
	}

	@Column(name = "type", nullable = false, length = 10)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "saveIn", nullable = false, precision = 22, scale = 0)
	public Double getSaveIn() {
		return this.saveIn;
	}

	public void setSaveIn(Double saveIn) {
		this.saveIn = saveIn;
	}

	@Column(name = "pay", nullable = false, precision = 22, scale = 0)
	public Double getPay() {
		return this.pay;
	}

	public void setPay(Double pay) {
		this.pay = pay;
	}

	@Column(name = "finalAmount", nullable = false, precision = 22, scale = 0)
	public Double getFinalAmount() {
		return this.finalAmount;
	}

	public void setFinalAmount(Double finalAmount) {
		this.finalAmount = finalAmount;
	}

	@Column(name = "paymentId", nullable = false)
	public Integer getPaymentId() {
		return this.paymentId;
	}

	public void setPaymentId(Integer paymentId) {
		this.paymentId = paymentId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bankacount")
	public Set<Recipt> getRecipts() {
		return this.recipts;
	}

	public void setRecipts(Set<Recipt> recipts) {
		this.recipts = recipts;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bankacount")
	public Set<Paybill> getPaybills() {
		return this.paybills;
	}

	public void setPaybills(Set<Paybill> paybills) {
		this.paybills = paybills;
	}

}